# Python 2.6.4
# Project Euler, Problem 80
# Copyright 2010 Talha Zaman

from decimal import *
getcontext().prec = 102
total = 0
for i in range(1,100):
    dec = str(Decimal(i).sqrt())
    if len(dec)>10:
        total += sum(int(d) for d in dec[:101] if d!='.')
print total
